Fix: Show all assessable sections ending in .1 (272 sections were hidden) #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The section filtering logic was incorrectly hiding 272 legitimate assessable code requirements from users.
The bug was in
app/api/compliance/sections/route.tswhere ALL sections ending in.1were excluded, based on the assumption that they were all intro sections titled "General" or "Scope".Impact
Users could not see or create checks for important requirements like:
11B-404.2.1- Revolving doors, gates and turnstiles11B-206.2.1- Site arrival points11B-213.3.1.1- Toilet compartments11B-407.4.1- Car dimensionsRoot Cause Analysis
Database analysis revealed that of 388 sections ending in
.1:Breakdown by depth:
Solution
Changed from depth-based filtering to title-based filtering:
.1that are titled "General" or "Scope"This precisely targets the 116 intro sections while preserving all 272 real requirements.
Testing
Verified against production database: